package com.wysql.common.model.vo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class TableVo {
    private List<PageInitVo> table;
    private List<ChartInitVo> chart;
    private List<FilterVo> filter;
    /**
     * //  没有权限
     * None,
     * //  省
     * Province,
     * //  市
     * City,
     * //  区县
     * Districts,
     * //  区域
     * Area,
     */
    private Integer permission;
    // 文字
    private String userAreaLabel;

    // btn
    private List<BtnVo> btn;

    private Object data;

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class FilterVo {
        private String name;
        private String url;
        private boolean visible = true;
        private boolean readonly;

        private String label;
        private String inputType;
        private String valueType;
        private Object value;
        private String operation;
        private String groupId;
        private Integer colNum;


        private List<OptionVo> selectOptions = new ArrayList<>();
    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class BtnVo {
        private String url;
        private String name;
        private String icon;
        private String label;
        /**
         *
         */
        private boolean disable;
        /**
         *
         */
        private boolean flag;
        // 确认提示框
        private String confirmMsg;
    }
}

